﻿<%@ Page Title="停发电查询" Language="C#" MasterPageFile="~/Web/Main.Master" AutoEventWireup="true" CodeBehind="PowerDownHistory.aspx.cs" Inherits="BOMS.WebUI.Web.PowerControl.PowerDownHistory" %>
<%@ Import Namespace="BOMS.WebUI.Web" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script type="text/javascript" src="/Js/Dialog.js"></script>
<script type ="text/javascript">
$(document).ready(function () {
    setInterval("startRequest()",<%=Common.RefreshIntev%>);
});
function startRequest() {
    $("#pds").load(location.href + " #pds>*", "" + Math.random() + "");
}
function zOpen(pid) {
    var diag = new Dialog("Diag2");
    diag.Width = 500;
    diag.Height = 250;
    diag.Title = "停放电调度操作";
    diag.URL = "web/PowerControl/PowerControlProcessAuto.aspx?id=" + pid + "&rdm=" + Math.random();
    diag.OKEvent = callback;    //点击确定后调用的方法
    diag.CancelEvent = callback;
    diag.show();
}
function callback(obj) {
    //debugger;
    if (obj.DialogArguments["returnValue"] == "true") {
    $("#pds").load(location.href + " #pds>*", "" + Math.random() + "");
    } else {
        // do nothing.
    }
}
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<table class="usertableborder" cellspacing="1" cellpadding="3" width="96%" align="center" border="0">
    <tr>
        <th>系统停发电历史查询</th>
    </tr>
    <tr class="usertablerow4">
        <td>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
	            <tr>
                    <td width="10%"></td>
                    <td width="65%" height="30" align="left">
                        调度基站：<asp:DropDownList ID="drpEquip" runat="server" AutoPostBack="true" Width="155px">
                            <asp:ListItem>请选择调度基站名称</asp:ListItem>
                            <asp:ListItem>线材公司基站</asp:ListItem>              
                        </asp:DropDownList>
                        <span style="margin-left:15px">调度类型：</span><asp:DropDownList ID="drp_warningStatus" runat="server">
                            <asp:ListItem>全部类型</asp:ListItem>
                            <asp:ListItem>停电</asp:ListItem>
                            <asp:ListItem>发电</asp:ListItem>
                            <asp:ListItem>未知</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td width="10%"></td>
                    <td width="65%" height="30" align="left">
                    开始时间：<asp:TextBox ID="txtDtmBegin" runat="server" Width="150px" CssClass="Wdate" onFocus="WdatePicker({skin:'whyGreen',isShowClear:true,readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss'})"></asp:TextBox>
                    &nbsp;结束时间：<asp:TextBox ID="txtDtmEnd" runat="server" Width="150px" CssClass="Wdate" onFocus="WdatePicker({skin:'whyGreen',isShowClear:true,readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss'})"></asp:TextBox>
                    <asp:Button ID="btnQuery" runat="server" Text="查 询" class="btnbg" /></td>
                </tr>
            </table>
        </td>
    </tr>
</table>
<table class="usertableborder" cellspacing="1" cellpadding="3" width="96%" align="center" border="0" id="pds">
    <tr class="usertablerow4">
        <td colspan="7">
            <table width="98%" border="0" cellspacing="1" cellpadding="0" align="center">
	            <tr>
		            <td width="75%" align="center"><font>查询结果：</font>A-Z时间 XX基站 系统停发电历史查询</td>
		            <td width="25%" align="right"><asp:Button ID="Button3" runat="server" Text="导出EXECL" class="btnbg" /></td>
	            </tr>
            </table> 
        </td>
    </tr>
    <tr>
        <td class="usertablerow3" width="15%">基站名称</td>
        <td class="usertablerow3" width="15%">IP地址</td>
        <td class="usertablerow3" width="15%">停电时间</td>
        <td class="usertablerow3" width="15%">恢复供电时间</td>
        <td class="usertablerow3" width="10%">已放电时长</td>
        <td class="usertablerow3" width="10%">剩余放电时长</td>
        <td class="usertablerow3" width="10%">是否通知发电</td>
<%--        <td class="usertablerow3" width="10%">查看操作</td>--%>
    </tr>
<asp:Repeater runat="server" ID="Repeater1" OnItemDataBound="Repeater1_ItemDataBound">
    <ItemTemplate>
    <tr class="usertablerow2">
        <td align="center"><%#Eval("HostName") %></td>
        <td align="center"><%#Eval("IP") %></td>
        <td align="center"><%#Eval("PowerDownTime")%></td>
        <td align="center"><%#Eval("PowerOnTime")%></td>
        <td align="center"><asp:Literal runat="Server" ID="ltrDscTime" Text='<%#Eval("DscTime")%>'></asp:Literal></td>
        <td align="center"><%#Eval("ResDscTime")%></td>
        <td align="center"><%#Eval("IsPowerOn")%></td>
<%--        <td align="center"><a onclick="javescript:zOpen(<%#Eval("ID")%>)">查看</a></td>--%>
    </tr>
    </ItemTemplate>
</asp:Repeater>
</table>
</asp:Content>